home *** CD-ROM | disk | FTP | other *** search
- Date: Sat, 18 Jun 94 14:31:18 MDT
- From: shenson@nyx10.cs.du.edu (Stephen Henson)
- Message-Id: <9406182031.AA19793@nyx10.cs.du.edu>
- X-Disclaimer: Nyx is a public access Unix system run by the University
- of Denver. The University has neither control over nor
- responsibility for the opinions or correct identity of users.
- To: mint@terminator.rs.itd.umich.edu
- Subject: Directory slow down ...
-
- Most of the points about directories have been covered already. If the directory
- is too big to fit entirely in the syscache it will thrash the filesystem a lot.
- This is exacerbated by the way the mintlib and some file utilities have to access
- the same file several times in a row requiring a repeated lookup. A quick solution
- is to increase the syscache size, either by recompiling or editing the binary.
- A better way would be to add a cookie cache to the kernel relpath2cookie function,
- something very simple like a single entry for the last lookup would cause a
- big performance win, though a larger cache would be even better.
- I could also make the Minixfs lookup function speed up by having it
- search directories from the point the last search suceeded (if at all) instead
- of the start. Actually I'm looking into this for pl11.
- I did some directory access speed checks some time ago. Basically
- making a directory with about 1024 entries and seeing how long it took to
- search it. I found it to be rather slow, as I've implied above. Well I thought
- it was slow until I tried it on a TOS filesystem ... It kept my computer busy
- for a few hours if nothing else.
- Now before anyone asks how you edit the binary here's how to do it.
- 1. Use the GCC utility 'cnm' to dump the symbol table of minix.xfs .
- 2. Note the values of the symbols _scache_size, _ucache_size and _icache_size.
- 3. Use your favourite binary editor to edit the binary at the points
- _?cache_size+0x1c (0x1c is the size of the binary header), these are all
- 16 bits and show the cache sizes in K.
-
- This is basically how you do binary configuration of a program, this can
- all be handled automatically by a program and nlist() used to lookup the symbol
- table. I never got round to finishing off my binary config program which would
- do all this more easily.
- If you look at minixfs/global.h you'll see lots of other things can
- be configured like this, e.g. cache mode, sync time, the 'physical partition'
- options, default translation modes etc etc.
- I could say a lot more about this, it is a very useful technique.
- For example you can change the default open modes (to use binary for example)
- or set up default paths for things like gcc etc. It is rather cleaner than
- having to override things all the time by filling up the environment.
- Steve.
-
-